using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Metropolicity
{
    class CoalPowerNode : PowerNode
    {
        int energyLeft;
        public CoalPowerNode(PlayScene parent)
            : base("coalPowerNode", new Vector2(384, 288), parent)
        {
            energyLeft = 30;
            energyRespawnTime = 2000;
        }
        public override EnergyCell createEnergy()
        {
            if (energyLeft > 0)
            {
                energyLeft--;
                EnergyCell energyCell = new CoalEnergyCell(new Vector2(collisionRectangle.Center.X, collisionRectangle.Center.Y));
                energyCell.LoadContent(parent.content); //remember to always call LoadContent when you create something new or it won't draw
                return energyCell;
            }
            return null;
        }
    }
}
